<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <link rel="stylesheet" href="./lib/mui/css/mui.min.css">
  <link rel="stylesheet" href="./lib/fa/css/font-awesome.min.css">
  <link rel="stylesheet" href="./css/common.css">
  <link rel="stylesheet" href="./css/search.css">
  <title>乐淘商城-搜索页</title>
</head>

<body>
  <div class="lt-layout">
    <!-- 头部 -->
    <div class="lt-header">
      <a href="index.html" class="mui-icon mui-icon-back back"></a>
      <h4>搜索中心</h4>
    </div>
    <div class="lt-main">
      <div class="mui-scroll-wrapper">
        <div class="mui-scroll">
          <!--这里放置真实显示的DOM内容-->
          <!-- 搜索框 -->
          <div class="lt-search">
            <input type="text" class="search-box" placeholder="请输入搜索关键词">
            <button class="btn-search mui-btn mui-btn-primary">搜索</button>
          </div>
          <!-- 搜索历史 -->
          <div class="search-history">
            <div class="search-title mui-clearfix">
              <span class="mui-pull-left">搜索历史</span>
              <span class="clear mui-pull-right"><i class=" mui-icon mui-icon-trash"></i>清空记录</span>
            </div>
            <ul class="search-list">
              <li class="mui-clearfix">
                <a href="#" class="mui-pull-left">鞋子</a>
                <span class="mui-icon mui-icon-closeempty mui-pull-right"></span>
              </li>
              <li class="mui-clearfix">
                <a href="#" class="mui-pull-left">鞋子</a>
                <span class="mui-icon mui-icon-closeempty mui-pull-right"></span>
              </li>
            </ul>
          </div>
        </div>
      </div>
    </div>
    <div class="lt-footer">
      <ul>
        <li><a href="index.html"><span class="mui-icon mui-icon-home"></span>首页</a></li>
        <li><a href="category.html"><span class="mui-icon mui-icon-list"></span>分类页</a></li>
        <li><a href="cart.html"><span class="mui-icon mui-icon-star"></span>购物车</a></li>
        <li><a href="user.html"><span class="mui-icon mui-icon-person"></span>用户中心</a></li>
      </ul>
    </div>
  </div>

  <!-- 搜索记录模板 -->
  <script type="text/html" id="tmp-search">
    {{ if list.length==0}}
      <p>没有更多搜索记录了！</p>
    {{ else }}
      <div class="search-title mui-clearfix">
        <span class="mui-pull-left">搜索历史</span>
        <span class="clear mui-pull-right"><i class=" mui-icon mui-icon-trash"></i>清空记录</span>
      </div>
      <ul class="search-list">
        {{ each list v i}}
          <li class="mui-clearfix">
            <a href="#" class="mui-pull-left">{{ v }}</a>
            <span class="mui-icon mui-icon-closeempty mui-pull-right btn-del" data-id="{{ i }}"></span>
          </li>
        {{ /each}}
      </ul>
    {{ /if }}
  </script>

  <script src="./lib/mui/js/mui.js"></script>
  <script src="./lib/zepto/zepto.min.js"></script>
  <script src="./lib/artTemplate/template-web.js"></script>
  <script src="./js/comment.js"></script>
  <script src="./js/search.js"></script>
</body>

</html>
